import { get, post } from './request';

export async function fetchAllApi() {
  return get('/node/api');
}

export async function addApi(data) {
  return post('/node/api/add', {
    data,
  });
}

export async function updateApi(data) {
  const url = `/node/api/update`;
  return post(url, {
    data,
  });
}

export async function deleteApi(id) {
  const url = `/node/api/delete/${id}`;
  return get(url);
}
